﻿using ConfExpert.Forms.Base;
using DevExpress.XtraEditors;
using DevTeam;
using System;
using System.Windows.Forms;

namespace ConfExpert.Forms.Depo.Tela
{
    public partial class Duzelt : XForm
    {
        public Duzelt()
        {
            InitializeComponent();
        }

        private void Duzelt_Load(object sender, EventArgs e)
        {

            sle3a.Edit.Assign(RI(Rp.Tela));
            sle3b.Edit.Assign(RI(Rp.Tela));

            btnBirlestir.ItemClick += btnBirlestir_ItemClick;
        }

        void btnBirlestir_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (intParse(sle3a.EditValue) > 0 && intParse(sle3b.EditValue) > 0)
                if (XtraMessageBox.Show("Emin misiniz?", "Confirmation", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
                {
                    ExecuteNonQuery("KartBirlestirTela", intParse(sle3a.EditValue), intParse(sle3b.EditValue));
                    //XtraMessageBox.Show("Kartlar birleştirildi.");
                }
        }

    }
}
